﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Skynet.BusinessLogic.DataAccess;
using Microsoft.Practices.Unity;
namespace Skynet.BusinessLogic.DataAccess
{
    public class StudentRepository : MasterRepository<BusinessEntities.Student>, IStudentRepository
    {
        public StudentRepository(IUnityContainer container)
            : base(container)
        {

        }

        public override void Add(BusinessEntities.Student item)
        {
            var ctx = this.ContainerService.Resolve<BusinessEntities.SkySchoolContainer>();
            ctx.Students.AddObject(item);
            ctx.SaveChanges(); 
        }
    }
}
